unit TestBase;

interface

uses Contnrs, IniFiles;

type

  TTestEvent = procedure (OldResult, NewResult: Integer) of object;

  TAbstractTest = class
  private
    FOnReceiveResults: TTestEvent;
  protected
    function GetName: string; virtual; abstract;
    function GetDescription: string; virtual; abstract;
  public
    procedure Configure; virtual; abstract;
    procedure Run; virtual; abstract;
    property Name: string read GetName;
    property Description: string read GetDescription;
    property OnReceiveResults: TTestEvent read FOnReceiveResults write FOnReceiveResults;
  end;

var
  TestList: TObjectList;
  IniFile: TIniFile;

implementation

uses SysUtils, Forms;

initialization
  TestList := TObjectList.Create;
  IniFile := TIniFile.Create(ChangeFileExt(Application.ExeName, '.ini'));

finalization
  TestList.Free;
  IniFile.Free;

end.
